 <include file="Public:head" /> 
 <link rel="stylesheet" href="{lanrain::STATICS}/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="{lanrain::STATICS}/kindeditor/plugins/code/prettify.css" />
<script src="{lanrain::STATICS}/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="{lanrain::STATICS}/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
<script src="{lanrain::STATICS}/kindeditor/plugins/code/prettify.js" type="text/javascript"></script>
<script src="/tpl/static/artDialog/jquery.artDialog.js?skin=default"></script>
<script src="/tpl/static/artDialog/plugins/iframeTools.js"></script>
<style type="text/css">
	.pic_img{width:145px;height:145px;}
	.px{width:135px;}
</style>
<script>
	KindEditor.ready(function(K){
		var editor = K.editor({
			allowFileManager:true
		});
		K('#upload_small_pic').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					fileUrl : K('#small_pic').val(),
					clickFn : function(url, title) {
						if(url.indexOf("http") > -1){
							K('#small_pic').val(url);
							$("#frontpic_src").attr('src',url);
						}else{
							K('#small_pic').val("{lanrain::C('site_url')}"+url);
							$("#frontpic_src").attr('src',"{lanrain::C('site_url')}"+url);
						}
						editor.hideDialog();
					}
				});
			});
		});
		K('#upload_site_map_1').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					fileUrl : K('#site_map_1').val(),
					clickFn : function(url, title) {
						if(url.indexOf("http") > -1){
							K('#site_map_1').val(url);
              $("#rightpic_src").attr('src',url);
						}else{
							K('#site_map_1').val("{lanrain::C('site_url')}"+url);
							$("#rightpic_src").attr('src',"{lanrain::C('site_url')}"+url);
						}
						editor.hideDialog();
					}
				});
			});
		});
		K('#upload_site_map_2').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					fileUrl : K('#site_map_2').val(),
					clickFn : function(url, title) {
						if(url.indexOf("http") > -1){
							K('#site_map_2').val(url);
              $("#backpic_src").attr('src',url);
						}else{
							K('#site_map_2').val("{lanrain::C('site_url')}"+url);
							$("#backpic_src").attr('src',"{lanrain::C('site_url')}"+url);
						}  
						editor.hideDialog();
					}
				});
			});
		});
		K('#upload_site_map_3').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					fileUrl : K('#site_map_3').val(),
					clickFn : function(url, title) {
						if(url.indexOf("http") > -1){
							K('#site_map_3').val(url);
              $("#leftpic_src").attr('src',url);
						}else{
							K('#site_map_3').val("{lanrain::C('site_url')}"+url);
							$("#leftpic_src").attr('src',"{lanrain::C('site_url')}"+url);
						}  
						editor.hideDialog();
					}
				});
			});
		});
		K('#upload_site_map_4').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					fileUrl : K('#site_map_4').val(),
					clickFn : function(url, title) {
						if(url.indexOf("http") > -1){
							K('#site_map_4').val(url);
              $("#toppic_src").attr('src',url);
						}else{
							K('#site_map_4').val("{lanrain::C('site_url')}"+url);
							$("#toppic_src").attr('src',"{lanrain::C('site_url')}"+url);
						}  
						editor.hideDialog();
					}
				});
			});
		});
		K('#upload_site_map_5').click(function() {
			editor.loadPlugin('image', function() {
				editor.plugin.imageDialog({
					fileUrl : K('#site_map_5').val(),
					clickFn : function(url, title) {
						if(url.indexOf("http") > -1){
							K('#site_map_5').val(url);
              $("#bottompic_src").attr('src',url);
						}else{
							K('#site_map_5').val("{lanrain::C('site_url')}"+url);
							$("#bottompic_src").attr('src',"{lanrain::C('site_url')}"+url);
						}
						editor.hideDialog();
					}
				});
			});
		});
	});
</script>

<script>

var editor;
KindEditor.ready(function(K) {
editor = K.create('#intro', {
resizeType : 1,
allowPreviewEmoticons : false,
allowImageUpload : true,
uploadJson : '/index.php?g=User&m=Upyun&a=kindedtiropic',
items : [
'source','undo','clearhtml','hr',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image','link', 'unlink','baidumap','lineheight','table','anchor','preview','print','template','code','cut']
});

});
</script>
<script>
function selectall(name) {
	var checkItems=$('.cbitem');
	if ($("#check_box").attr('checked')==false) {
		$.each(checkItems, function(i,val){
			val.checked=false;
		});
		
	} else {
		$.each(checkItems, function(i,val){
			val.checked=true;
		});
	}
}
function setlatlng(longitude,latitude){
	art.dialog.data('longitude', longitude);
	art.dialog.data('latitude', latitude);
	// 此时 iframeA.html 页面可以使用 art.dialog.data('test') 获取到数据，如：
	// document.getElementById('aInput').value = art.dialog.data('test');
	art.dialog.open('{lanrain::U('Map/setLatLng',array('token'=>$token,'id'=>$id))}',{lock:false,title:'设置经纬度',width:600,height:400,yesText:'关闭',background: '#000',opacity: 0.87});
}
</script>
<input type="hidden" id="catUrl" value="{lanrain::U('Product/ajaxCatOptions',array('token'=>$token))}" />
<div class="content" style="width:920px; background:none; margin-left:275px; border:none; margin-bottom:30px;" >
   <div class="cLineB"> 
    <h4>360°全景设置</h4> 
    <a href="{lanrain::U('Panorama/index',array('token'=>$token))}" class="right  btnGreen" style="margin-top:-27px">返回</a> 
   </div> 
   
   
   
   <form class="form" method="post" action="" enctype="multipart/form-data"> 
   <input type="hidden" name="token" value="{lanrain:$token}" />
<if condition="$isUpdate eq 1">
<input type="hidden" name="id" value="{lanrain:$set.id}" />
</if>
<input type="hidden" name="discount" id="discount" value="{lanrain:$set.discount}" />
    <div class="msgWrap bgfc" style="padding:10px 10px 30px 0px;"> 
    <table class="userinfoArea" border="0" cellspacing="0" cellpadding="0" width="100%">
              <tbody>
              	 <tr>
                    <td align="right" width="86"><label for="title">名称：</label></td>
              		<td width="814"><input type="input" class="px" id="name" name="name" value="{lanrain:$set.name}" style="width:420px;"></td>
              		</tr>
              		 <tr>
                    <td align="right"><label for="title">关键词：</label></td>
              		<td><input type="input" class="px" id="keyword" value="{lanrain:$set.keyword}" name="keyword" style="width:420px;"></td>
              		</tr>
              		<tr>
                    <td align="right"><label for="title">顺序数字：</label></td>
              		<td><input type="input" class="px" id="taxis" value="{lanrain:$set.taxis}" name="taxis" style="width:420px;">  由小到大排列</td>
              		</tr>
                     <tr style="display:none">
                    <td align="right"><label for="title">背景音乐：</label></td>
              		<td><input type="input" class="px" id="music" value="{lanrain:$set.music}" name="music" style="width:420px;"></td>
              		</tr>
                     <tr>
                       <td colspan="2" align="right">
                         <table border="0" cellspacing="0" cellpadding="0" class="quanjing">
                         <tbody><tr>
                           <td align="center">前</td>
                           <td align="center">右</td>
                           <td align="center">后</td>
                           <td align="center">左</td>
                           <td align="center">顶部</td>
                           <td align="center">底部</td>
                         </tr>
                         <tr>
                           <td align="center">
                               <?php if($_GET['id']!=''){ ?>
                                    <img src="{lanrain:$set.frontpic}" id='frontpic_src' class="pic_img" >
                               <?php }else{ ?>
                                    <img src="/tpl/User/default/common/images/panorama/0.jpg" id='frontpic_src' class="pic_img" >
                               <?php } ?>
                           </td>
                           <td align="center">
                               <?php if($_GET['id']!=''){ ?>
                                    <img src="{lanrain:$set.rightpic}" id='rightpic_src' class="pic_img"  >
                               <?php }else{ ?>
                                    <img src="/tpl/User/default/common/images/panorama/1.jpg" id='rightpic_src' class="pic_img" >
                               <?php } ?>
                           </td>
                           <td align="center">
                               <?php if($_GET['id']!=''){ ?>
                                    <img src="{lanrain:$set.backpic}" id='backpic_src' class="pic_img" >
                               <?php }else{ ?>
                                    <img src="/tpl/User/default/common/images/panorama/2.jpg" id='backpic_src' class="pic_img" >
                               <?php } ?>
                           </td>
                           <td align="center">
                               <?php if($_GET['id']!=''){ ?>
                                    <img src="{lanrain:$set.leftpic}" id='leftpic_src' class="pic_img" >
                               <?php }else{ ?>
                                    <img src="/tpl/User/default/common/images/panorama/3.jpg" id='leftpic_src' class="pic_img" >
                               <?php } ?>
                           </td>
                           <td align="center">
                               <?php if($_GET['id']!=''){ ?>
                                    <img src="{lanrain:$set.toppic}" id='toppic_src' class="pic_img" >
                               <?php }else{ ?>
                                    <img src="/tpl/User/default/common/images/panorama/4.jpg" id='toppic_src' class="pic_img" >
                               <?php } ?>
                           </td>
                            <td align="center">
                               <?php if($_GET['id']!=''){ ?>
                                    <img src="{lanrain:$set.bottompic}" id='bottompic_src' class="pic_img" >
                               <?php }else{ ?>
                                    <img src="/tpl/User/default/common/images/panorama/5.jpg" id='bottompic_src' class="pic_img" >
                               <?php } ?>
                           </td>
                         </tr>
                         <tr>
                           <td>
                           		<?php if($_GET['id']!=''){ ?>
                                    <input type="text" readonly="readonly" class="px"  value="{lanrain:$set.frontpic}" name="frontpic" id="small_pic" />
                               <?php }else{ ?>
                                    <input type="text" readonly="readonly" class="px"  value="/tpl/User/default/common/images/panorama/0.jpg" name="frontpic" id="small_pic" />
                               <?php } ?>
                           </td>
                           <td>
                           		<?php if($_GET['id']!=''){ ?>
                                    <input type="text" readonly="readonly" class="px"  value="{lanrain:$set.rightpic}" name="rightpic" id="site_map_1" />
                               <?php }else{ ?>
                                    <input type="text" readonly="readonly" class="px"  value="/tpl/User/default/common/images/panorama/1.jpg" name="rightpic" id="site_map_1" />
                               <?php } ?>
                           </td>
                           <td>
                           		<?php if($_GET['id']!=''){ ?>
                                    <input type="text" readonly="readonly" class="px"  value="{lanrain:$set.backpic}" name="backpic" id="site_map_2" />
                               <?php }else{ ?>
                                    <input type="text" readonly="readonly" class="px"  value="/tpl/User/default/common/images/panorama/2.jpg" name="backpic" id="site_map_2" />
                               <?php } ?>
                           </td>
                           <td>
                           		<?php if($_GET['id']!=''){ ?>
                                    <input type="text" readonly="readonly" class="px"  value="{lanrain:$set.leftpic}" name="leftpic" id="site_map_3" />
                               <?php }else{ ?>
                                    <input type="text" readonly="readonly" class="px"  value="/tpl/User/default/common/images/panorama/3.jpg" name="leftpic" id="site_map_3" />
                               <?php } ?>
                           </td>
                          <td>
                           		<?php if($_GET['id']!=''){ ?>
                                    <input type="text" readonly="readonly" class="px"  value="{lanrain:$set.toppic}" name="toppic" id="site_map_4" />
                               <?php }else{ ?>
                                    <input type="text" readonly="readonly" class="px"  value="/tpl/User/default/common/images/panorama/4.jpg" name="toppic" id="site_map_4" />
                               <?php } ?>
                           </td>
                           <td>
                           		<?php if($_GET['id']!=''){ ?>
                                    <input type="text" readonly="readonly" class="px"  value="{lanrain:$set.bottompic}" name="bottompic" id="site_map_5" />
                               <?php }else{ ?>
                                    <input type="text" readonly="readonly" class="px"  value="/tpl/User/default/common/images/panorama/5.jpg" name="bottompic" id="site_map_5" />
                               <?php } ?>
                           </td>
                         </tr>
                         <tr>
                           <td align="center"><a href="###" id="upload_small_pic" >上传</a></td>
                           <td align="center"><a href="###" id="upload_site_map_1" >上传</a></td>
                           <td align="center"><a href="###" id="upload_site_map_2" >上传</a></td>
                           <td align="center"><a href="###" id="upload_site_map_3" >上传</a></td>
                           <td align="center"><a href="###" id="upload_site_map_4" >上传</a></td>
                           <td align="center"><a href="###" id="upload_site_map_5" >上传</a></td>
                         </tr>
                       </tbody>
                       </table></td>
                     </tr>
                   <tr>
                    <td align="right" valign="top"><label for="catepic">描述信息：</label></td>
              		<td><textarea name="intro" class="px" style="width:420px; height:150px">{lanrain:$set.intro}</textarea> </td>
              		</tr>
              	<tr>
              		<td></td>
              		<td colspan="3"><button type="submit" name="button" class="btnGreen">保存</button>　<a href="{lanrain::U('Panorama/index',array('token'=>$token))}" class="btnGray vm">取消</a></td>
              		</tr>
              	</tbody>
            </table>
     </div>
   </form> 
  </div> 
  <include file="Public:footer" />